<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>login</title>
    <link rel="stylesheet" href="/public/css/index.css">
    <style>
        body {
            margin: 0;
        }

        #box {
            padding-top: min(150px, 30%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-around;
        }

        .imgLogo {
            width: min(150px, 30%);
            aspect-ratio: 1;
        }

        #loginBtn {
            width: min(150px, 30%);
        }
    </style>
</head>
<body>
<div id="box">
    <img src="/public/image/logo.PNG" alt="logo" class="imgLogo">
    <h4>建规学院意见反馈平台</h4>
    <button id="loginBtn" class="button" style="font-size: 12px">微信登录</button>
</div>
<script>
    const config = {
        APPID: "wxa7fbc826a90a456d",
        REDIRECT_URI: "https%3A%2F%2Fjgxy-22867-6-1315880052.sh.run.tcloudbase.com%2Fpublic%2Fuser%2Findex.html",//"https%3A%2F%2Fjg-test-22867-6-1315880052.sh.run.tcloudbase.com%2Fuser%2Findex.html",
        SCOPE: "snsapi_userinfo"
    }
    document.getElementById("loginBtn").addEventListener("click", function () {
        window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.APPID}&redirect_uri=${config.REDIRECT_URI}&response_type=code&scope=${config.SCOPE}&#wechat_redirect`
    })
</script>

</body>
</html>
